Conversation
eb06760 to
22f6229
Compare
|
This is to check the NSID and NS if created correctly by the TP as mentioned by the issue comment #2668 (comment). |
|
Sorry you lost me here. What's the purpose with these changes? |
|
No problem. The purpose is to output the json nsid key and value as below then I think that the TP can check the NS if created correctly. Thank you. tokunori@tokunori-desktop:~/nvme-cli$ nvme-build create-ns /dev/nvme0 -s -1 -c 1 -f 0 -o json
{
"create-ns":"Success, created",
"nsid":"1"
} |
|
Rebased the commits and added the tests changes also to check the create-ns nsid value. |
| json_output_object(r); | ||
| } | ||
|
|
||
| static void json_output_key_value(bool space, bool eol, const char *key, const char *val, |
There was a problem hiding this comment.
The two arguments space and eol should not be exposed to the user here. First, having function with several arguments using bools are always hard to read, secondly, this leaks the output layer features to the users side.
| if (!(le16_to_cpu(ctrl->oacs) & NVME_CTRL_OACS_NS_MGMT)) | ||
| nvme_show_key_value(true, false, name, "Success, %s", | ||
| !strcmp(cmd, "create") ? "created" : | ||
| !strcmp(cmd, "delete") ? "deleted" : ""); |
There was a problem hiding this comment.
strcmp cmd seems a bit excessive, why not just write 'create command was sucessful' or something along the line. or just 'success'. nvme create-ns -> success should be good enough.
|
The nightly builds are currently not running. I'd like to get them working again before merging this because of the last patch. |
|
Fixed the changes as mentioned and also noted about the nightly builds situation. Thank you. |
|
FYI, @MaisenbacherD is updating/re-configuring the nightly CI runner environment. As all projects, it takes a bit longer than expected :) |
|
Thank you. Noted it. |
|
The nightly tests are running again :) |
This is to output a command result as json key and value. Signed-off-by: Tokunori Ikegami <[email protected]>
This is to use the command result NSID created by TP. Signed-off-by: Tokunori Ikegami <[email protected]>
Also the command output-format is changed to json. Signed-off-by: Tokunori Ikegami <[email protected]>
|
I"ve rebased the series and refactored |
|
Nightly builds passed. So all good. Thanks everyone! |
No description provided.